//
//  ViewController.m
//  1
//
//  Created by 陈璟 on 16/1/21.
//  Copyright © 2016年 陈璟. All rights reserved.
//

#import "ViewController.h"
#import "TwoViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor redColor];
    
    
    UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
    btn.frame = CGRectMake(100, 200, 50, 50);
    [btn setBackgroundColor:[UIColor yellowColor]];
    [btn addTarget:self action:@selector(btnClick) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:btn];
    
    NSLog(@"3333");
    
}

- (void)btnClick
{
    TwoViewController *two = [[TwoViewController alloc] init];
    two.firstText = @"5555";
    [self.navigationController pushViewController:two animated:YES];
//    [self presentViewController:two animated:YES completion:nil];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
